# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=libretro-dosbox
pkgver=0_git20220406
pkgrel=0
_commit="74cd17ed0ff810ff78cb8c1f1e45513bfe8a0f32"
pkgdesc="Port of DOSBox (upstream) to the libretro API"
url="https://github.com/libretro/dosbox-libretro"
arch="all"
license="GPL-2.0-only"
source="$pkgname-$_commit.tar.gz::https://github.com/libretro/dosbox-libretro/archive/$_commit.tar.gz"
builddir="$srcdir/dosbox-libretro-$_commit"
options="!check" # No tests

build() {
	# force old c++ standard as the code is invalid c++17
	CXXFLAGS="$CXXFLAGS -std=c++14" make -f Makefile.libretro
}

package() {
	install -Dm644 dosbox_libretro.so "$pkgdir"/usr/lib/libretro/dosbox_libretro.so
}

sha512sums="
d0c1fcf94dfab6fce4a5e16deea962fc706e3a5ad8ec67b5bbd26eaceeca3ae680e41a5dfbfa0d8049d1c96843cd3cc948c8118b9c8c4452f9a9056e4ff73846  libretro-dosbox-74cd17ed0ff810ff78cb8c1f1e45513bfe8a0f32.tar.gz
"
